package com.cfam.holidays.config;

import org.slf4j.helpers.MessageFormatter;

public class BaseException extends RuntimeException{
	
	private static final long serialVersionUID = 1L;
	
	private String code;

	private String msg;
	

	public BaseException(String code, String msg) {
		super(msg);
		this.code=code;
		this.msg=msg;
	}

	public BaseException(String code, String msg, Object... args) {
		super(MessageFormatter.arrayFormat(msg, args).getMessage());
		this.code = code;
		this.msg = MessageFormatter.arrayFormat(msg, args).getMessage();
	}

	public String getCode() {
		return code;
	}

	public String setCode(String code) {
		return this.code=code;
	}
	public String getMsg() {
		return msg;
	}

	public void setMsg(String msg) {
		this.msg = msg;
	}

}
